import sys, random, math

def dprint(dict):
	for key in dict.keys():
		print str(key) + "\t" + str(dict[key])

def f((a,b,c)):
	return (b, c+a/2, a/2)

def run(orig):
	l = []

	count = 0
	x = f(orig)
	
	while not (x[0] == x[1] and x[1] == 2 * x[2]):
#		print x
		x = f(x)
		count += 1
	return count

def exp(cap):
	dict = {}

	for i in range(cap):
		for j in range(cap):
			for k in range(cap):
				a = max(i,j,k)
				b = run((i,j,k))
				if a in dict:
					dict[a] = max(b, dict[a])
				else:
					dict[a] = b
	
	dprint(dict)

def test2():
	dict = {}
	for i in range(500):
		dict[i] = run((2 ** i, 0, 0))
	dprint(dict)

# test2()

# exp(int(sys.argv[1]))

print run((int(sys.argv[1]), int(sys.argv[2]), int(sys.argv[3])))
